<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<script src="GoogleCodeWikiParser.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/jquery-1.5.2.min.js" type="text/javascript"></script>
<script src="jquery.ba-postmessage.min.js" type="text/javascript"></script>
<script src="xregexp-min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.fn.outerScrollHeight = function(includeMargin) {
var element = this[0];
var jElement = $(element);
var totalHeight = element.scrollHeight; //includes padding
//totalHeight += parseInt(jElement.css("border-top-width"), 10) + parseInt(jElement.css("border-bottom-width"), 10);
//if(includeMargin) totalHeight += parseInt(jElement.css("margin-top"), 10) + parseInt(jElement.css("margin-bottom"), 10);
totalHeight += jElement.outerHeight(includeMargin) - jElement.innerHeight();
return totalHeight;
};
jQuery.fn.outerScrollWidth = function(includeMargin) {
var element = this[0];
var jElement = $(element);
var totalWidth = element.scrollWidth; //includes padding
//totalWidth += parseInt(jElement.css("border-left-width"), 10) + parseInt(jElement.css("border-right-width"), 10);
//if(includeMargin) totalWidth += parseInt(jElement.css("margin-left"), 10) + parseInt(jElement.css("margin-right"), 10);
totalWidth += jElement.outerWidth(includeMargin) - jElement.innerWidth();
return totalWidth;
};


_gnpi_projectname="wikignpi";
_gnpi_subversion="hg";
_gnpi_auto_resize=false;
_gnpi_disableWarnings=true;
_gnpi_baseurl="";
_gnpi_openURLSInNewWindow=true;
_gnpi_wikiname="";
_gnpi_showLabels=false;
_gnpi_showSummary=false;
_gnpi_showFileName=false;
monitor_height=-1;
prepended_clicker=false;


checkForOptions=function(){
  if(document.location.href.indexOf('?')>0)
  {
    var sl = document.location.href.length;
    sl = document.location.hash.length>1 ? document.location.href.indexOf('#') : sl;
    var opstr = document.location.href.substr(0,sl);
    sl = document.location.href.indexOf('?');
    opstr = opstr.substr(sl+1);
    var opts = opstr.split('&');
    for(var j=0; j<opts.length; j++)
    {
      if(opts[j].length>0)
      {
        eval(unescape(opts[j])+'');
      }
    }
  }
};


_postwiki=function(data)
{
  var g = new GoogleCodeWikiParser(_gnpi_showSummary,_gnpi_showLabels);
  g.options.disableWarnings=_gnpi_disableWarnings;
  g.options.wikiBaseURL=_gnpi_baseurl;
  g.options.openURLSInNewWindow=_gnpi_openURLSInNewWindow;
  var html = g.parse( data );
  if(_gnpi_showFileName) html = "<h1>"+_gnpi_wikiname+"</h1>" + html;
  document.body.innerHTML=html;

  if(_gnpi_auto_resize)
  {
    $(function(){
      // Get the parent page URL as it was passed in, for browsers that don't support
      // window.postMessage (this URL could be hard-coded).
      var parent_url = decodeURIComponent( document.location.hash.replace( /^#/, '' ) );

      // The first param is serialized using $.param (if not a string) and passed to the
      // parent window. If window.postMessage exists, the param is passed using that,
      // otherwise it is passed in the location hash (that's why parent_url is required).
      // The second param is the targetOrigin.
      function setHeight() {
        monitor_height=$('body').outerHeight( true );
        $.postMessage({ if_height:monitor_height }, parent_url, parent );
      };

      function verifyHeightPeriodically() {
        if ($('body').outerHeight( true ) != monitor_height)
        {
          if(!prepended_clicker)
          {
            prepended_clicker=true;
            $( '<a href="#">Force resize (internal)<\/a>' )
                .prependTo( 'body' )
                .click(function(){
                  setHeight();
                  return false;
                });
          }
          setHeight();
        }

        setTimeout(verifyHeightPeriodically,500);
      };

      // Now that the DOM has been set up (and the height should be set) invoke setHeight.
      //setHeight();
      setTimeout(verifyHeightPeriodically,5000);

      $.receiveMessage(function(e){
        if ( e.data === 'resize' ) {
          setHeight();
        }
      }, 'http://code-opensocial.googleusercontent.com' );
    });
  }
};

checkForOptions();

if(_gnpi_subversion.indexOf("hg")>=0) {
  var url="http://"+document.location.hostname+"/hg/"+_gnpi_wikiname+".wiki";
} else { /* _gnpi_subversion.indexOf("svn")>=0 */
  var url="http://"+document.location.hostname+"/svn/wiki/"+_gnpi_wikiname+".wiki";
}

$.ajax({
  url: url,
  success: _postwiki
});
</script>
<link href="ph_core.min.css" rel="stylesheet" type="text/css"></link>
<link href="ph_detail.min.css" rel="stylesheet" type="text/css"></link>
<!--[if IE]>
 <link type="text/css" rel="stylesheet" href="d_ie.css" >
<![endif]-->
</head>

<body id="wikicontent">
<p>Collecting data, please wait...</p>
</body>
</html>